#include "Keyboard.h"

CKeyboard::CKeyboard(void)
{
}

CKeyboard::~CKeyboard(void)
{
}

void CKeyboard::parseMessage(Message& msg, vector<Message>& retMsg)
{
	switch(msg.MsgCode)
	{
	case MSG_INIT:
		break;
	case MSG_UPDATE:
		{
			cout << '>';
			cin >> keys;
			cout << endl;
		}
		break;
	case MSG_GET_PRESSED_KEYS:
		{
			PKeys k = make_shared<CKeys>(keys);
			Message m("Keyboard",msg.From,MSG_PRESSED_KEYS, k);
			retMsg.push_back(m);
		}
		break;
	default:
		break;
	}
}